package test1223;

public class Test02 {
    public static void main(String[] args) {

        // 打印5位数各个位的数字
        int value = 81452;
        int first = value / 10000;
        int second = (value - first * 10000) / 1000;
        int third = (value - first * 10000 - second * 1000) / 100;
        int fourth = (value - first * 10000 - second * 1000 - third * 100) / 10;
        int fifth = value - first * 10000 - second * 1000 - third * 100 - fourth * 10;
        System.out.println("万位：" + first);
        System.out.println("千位：" + second);
        System.out.println("百位：" + third);
        System.out.println("十位：" + fourth);
        System.out.println("个位：" + fifth);
    }
}
